package com.atguigu.jxc.controller;

import com.atguigu.jxc.service.GoodsUnitService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;

/**
 * TODO
 *
 * @author Mr.zhao
 * @version 1.0
 * @date 2021/12/31 12:56
 *
 * http://localhost:8080/unit/list
 */

@RestController
@RequestMapping("/unit")
public class GoodsUnitController {

    @Autowired
    private GoodsUnitService goodsUnitService;

    @PostMapping("/list")
    public Map<String,Object> getUnit(){
        return goodsUnitService.getUnit();
    }
}
